// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
    env:'mupp-5gs2863z7cf6873f'
})

// 云函数入口函数
exports.main = async (event, context) => {
    const wxContext = cloud.getWXContext()
    if(localtion==0){
        res=await shop.get()
        console.log('所有')

    }else{
        console.log(localtion)
        res=await shop.where({
            localtion
        }).get()
    }

    return {
        event,
        openid: wxContext.OPENID,
        appid: wxContext.APPID,
        unionid: wxContext.UNIONID,
    }
}